<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <base th:href="${#request.getContextPath() + '/system/'}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
    <!-- Reset Stylesheet -->
    <link rel="stylesheet" href="resources/css/reset.css" type="text/css"
          media="screen" />
    <!-- Main Stylesheet -->
    <link rel="stylesheet" href="resources/css/style.css" type="text/css"
          media="screen" />
    <link rel="stylesheet" href="resources/css/invalid.css" type="text/css"
          media="screen" />

    <!--                       Javascripts                       -->
    <!-- jQuery -->
    <script type="text/javascript"
            src="resources/scripts/jquery-1.3.2.min.js"></script>
    <!-- jQuery Configuration -->
    <script type="text/javascript"
            src="resources/scripts/simpla.jquery.configuration.js"></script>

    <script th:inline="javascript">
        //删除会议
        function deletemeeting(){
            //批量删除
            var length = $("input[type='checkbox'][name='mid']:checked").length;
            if(length <= 0){
                alert("请至少选择一条会议记录");
                return;
            }


            if(confirm("确定要删除指定的会议信息吗？")){
                var out_trade_no = [[${#request.getContextPath()}]];
                $("#formid").attr("action", out_trade_no + "/meeting/deleteMeeting");
                //提交表单
                $("#formid").submit();
            }
        }
    </script>
</head>
<body>
<div id="main-content">
    <div class="content-box">
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <h2>会议列表</h2>
            <!-- 搜索 -->
            <form th:action="${#request.getContextPath() + '/meeting/search'}" method="get">
                <input
                        class="text-input small-input" type="text" autocomplete="off"
                        name="keyword" placeholder="请输入会议名称或者号码" th:value="${keyword}"/>
                <button type="submit" class="mybutton">搜索</button>
            </form>

            <br/>
            <hr/>
            <br/>

            <div class="tab-content default-tab" id="tab1">
                <form id="formid" method="post">
                <table>
                    <thead>
                    <tr>
                        <th><input class="check-all" type="checkbox" />全选</th>
                        <th>会议名称/号码</th>
                        <th>状态</th>
                        <th>开始时间</th>
                        <th>时长</th>
                        <th>会议类型</th>
                        <th>备注</th>
                    </tr>
                    </thead>

                    <tbody>
                    <tr th:switch="${meeting.type}" th:each="meeting : ${meetings}">
                        <td><input type="checkbox" name="mid" th:value="${meeting.id}"/></td>
                        <td th:text="${meeting.name} + '/' + ${meeting.number}">Lorem ipsum dolor</td>
                        <td th:text="${meeting.hystate == 1 ? '会议进行中' : '会议已结束'}"><a href="#" title="title">Sit amet</a></td>
                        <td th:text="${#dates.format(meeting.createtime, 'yyyy-MM-dd HH:mm:ss')}">Consectetur adipiscing</td>
                        <td th:text="${meeting.isfoerver == 1 ? '永久会议' : meeting.timeStr}">Donec tortor diam</td>
                        <td th:case="0" th:text="主麦形式">Donec tortor diam</td>
                        <td th:case="1" th:text="多方讨论形式">Donec tortor diam</td>
                        <td th:text="${meeting.info != '' ? meeting.info : '无'}">备注</td>
                        <!--<td>
                            &lt;!&ndash; Icons &ndash;&gt; <a href="#" title="Edit"><img
                                src="resources/images/icons/pencil.png" alt="Edit" /></a> <a
                                href="#" title="Delete"><img
                                src="resources/images/icons/cross.png" alt="Delete" /></a> <a
                                href="#" title="Edit Meta"><img
                                src="resources/images/icons/hammer_screwdriver.png"
                                alt="Edit Meta" /></a>
                        </td>-->
                    </tr>
                    </tbody>

                    <!-- 脚部 -->
                    <tfoot>
                    <tr>
                        <td colspan="6">
                            <div class="bulk-actions align-left">
                                <a class="mybutton" href="javascript:deletemeeting();">删除会议</a>
                            </div>
                            <!-- 分页导航 -->
                            <div class="pagination" th:replace="system/page :: fenye">
                            </div> <!-- End .pagination -->
                            <div class="clear"></div>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                </form>


            </div>
        </div>
        <!-- End .content-box-content -->
    </div>
</div>
<!-- End #main-content -->
</body>
</html>